package com.yi.mall.demo.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.LocalTime;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserInfo implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.ASSIGN_ID)//采用雪花算法自增主键id，（一般自增会因为分库分表出问题）
    private Long id;
    private String username;
    private String password;
    private String nickName;
    private String email;
    private String note;
    @TableField(fill = FieldFill.INSERT)//采用插入方式自动填充字段
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT)
    private Integer status;
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    public UserInfo(String username, String password, String nickname, String email, String note) {
        this.username = username;
        this.password = password;
        this.nickName = nickname;
        this.email = email;
        this.note = note;
    }
}
